package com.xunlai.infra.permission.business.dao.repository;

import com.xunlai.infra.permission.business.dao.entity.PosterTemplate;
import com.xunlai.infra.permission.business.dao.entity.vo.RouteTemplateCountVo;
import com.xunlai.infra.permission.storage.repository.BaseAllRoundRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jdbc.repository.query.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Set;

/**
 * @author liang
 * @date 8/7/23 9:49 PM
 */
@Transactional(rollbackFor = Exception.class)
public interface PosterTemplateRepository extends BaseAllRoundRepository<PosterTemplate,Long> {

    Page<PosterTemplate> findAllByIdInAndPosterTypeInAndPosterNameContains(Set<Long> id,Set<Long> posterType, String posterName, Pageable pageable);
    Page<PosterTemplate> findAllByIdInAndPosterTypeAndPosterNameContains(Set<Long> id,Long posterType, String posterName, Pageable pageable);
    Page<PosterTemplate> findAllByIdInAndPosterNameContains(Set<Long> id, String posterName, Pageable pageable);

    Page<PosterTemplate> findAllByIdNotInAndPosterTypeInAndPosterNameContains(Set<Long> id,Set<Long> posterType, String posterName, Pageable pageable);
    Page<PosterTemplate> findAllByIdNotInAndPosterTypeAndPosterNameContains(Set<Long> id,Long posterType, String posterName, Pageable pageable);
    Page<PosterTemplate> findAllByIdNotInAndPosterNameContains(Set<Long> id, String posterName, Pageable pageable);

    Page<PosterTemplate> findAllByPosterTypeInAndPosterNameContains(Set<Long> posterType,String posterName, Pageable pageable);


    Page<PosterTemplate> findAllByPosterTypeAndPosterNameContains(Long posterType,String posterName, Pageable pageable);

    Page<PosterTemplate> findAllByPosterNameContains(String posterName, Pageable pageable);


}
